import { showNotify, closeNotify } from 'vant';

export const notify = (text?: string, option?: any) => {
    if (text === "close") {
        closeNotify();
        return false;
    } else {
        let opt: any = Object.assign({}, {
            type: 'success', // 消息的类型
            normal: true, // 是否普通消息
        }, option);
        showNotify({ type: opt.type, message: text });
    }
}

